 <extend name="Index:basic" />

 <block name="title"><title>我爱预约网登录页面</title></block>
  <block name="files">
    <link href="__ROOT__/Application/Home/View/Public/Css/User/index.css" rel="stylesheet" type="text/css" />   

  </block>   

  <block name='content'>

    <div class="row">
      <div class="col-md-8 login_box col-md-offset-2">
          <h2>欢迎登陆</h2>
          <form class="form-horizontal col-md-offset-2" action="{:U('check')}" method='post'>
            <div class="form-group">
              <label for="username" class="col-sm-2 control-label">帐号</label>
              <div class="col-sm-6">
                <input type="text" class="form-control" id="username" placeholder="手机号或者用户名" name="user_name">
              </div>
            </div>
            <div class="form-group">
              <label for="passsword" class="col-sm-2 control-label">密码</label>
              <div class="col-sm-6">
                <input type="password" class="form-control" id="password" placeholder="" name="user_password">
              </div>
            </div>
             <div class="form-group">
                <label for="verify_code" class="col-sm-2 control-label">验证码</label>
                <div class="col-sm-3">
                  <input type="text" class="form-control" id="verify_code" placeholder="" name="fcode">
                </div>
                <div class="col-sm-2 verify_code_picture_box">
                      <img alt="验证码" src="{:U('verify',array())}" title="点击刷新">
                </div>
              </div> 
            <!--<div class="form-group">
              <div class="col-sm-offset-2 col-sm-3">
                <div class="checkbox">
                  <label>
                    <input type="checkbox"> 记住帐号
                  </label>
                </div>
              </div>
            </div>-->
            <div class="form-group">
              <div class="col-sm-offset-2 col-sm-6">  
                <button name="Submit2" type="submit" class="btn btn-default">登录</button>                
                <a class="col-sm-offset-1" href="{:U('User/Registe')}">还没帐号，立即注册</a>
              </div>
            </div>
          </form>
      </div>
    </div>
    <script type="text/javascript">


var captcha_img = $('.verify_code_picture_box').find('img')  
var verifyimg = captcha_img.attr("src");  
captcha_img.attr('title', '点击刷新');  
captcha_img.click(function(){  
    if( verifyimg.indexOf('?')>0){  
        $(this).attr("src", verifyimg+'&random='+Math.random());  
    }else{  
        $(this).attr("src", verifyimg.replace(/\?.*$/,'')+'?'+Math.random());  
    }  
}); 
    
</script>
  </block>
